package com.ruoyi.system.mapper;

import com.ruoyi.common.core.dao.BaseMapper;
import com.ruoyi.common.entity.DO.product.ProductCategoryDO;
import com.ruoyi.common.entity.DO.product.ProductCategoryLinkDO;
import com.ruoyi.common.entity.DO.product.ProductDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * 商品分类关联 数据层
 *
 * @author lijiantao
 */
public interface IAsyncProductCategoryLinkMapper extends BaseMapper<ProductCategoryLinkDO> {

    /**
     * 根据模块类型和ID删除关联图片
     *
     * @param productId
     * @return
     */
    @Delete("DELETE FROM product_category_link  WHERE product_id=#{productId}")
    int deleteByProductId(Long productId);
}
